<?php  
namespace app\index\controller;
// use think\Controller;
class Hrresource extends Base{
	public function hrresource(){
		return view('hrresource');
	}
	public function hrconcept(){
		return view();
	}
	public function hrdevelopment(){
		return view();
	}
	public function job(){
		$arr=db('jobs')->where('type=0')->select();
		return view('',['arr'=>$arr]);
	}
	public function resume_add(){
		// halt(input());
		$file=request()->file('resume');
		// halt($file);
		$info=$file->move(ROOT_PATH.'public'.'/static/uploads');
		if($info){
			$_POST['resume']=$info->getSaveName();
		}else{
			echo $info->getError();	
		}
		if(db('jobs')->insert($_POST)){
			$this->success('投递成功','job');
		}else{
			$this->error('投递失败','job');
		}
	}
	public function job_details(){
		// halt(input());
		$arr=db('jobs')->find($_GET['id']);
		return view('',['arr'=>$arr]);
	}
}
?>